package cn.edu.dutir.test.unit.utility.encoding;

import java.util.Date;

import cn.edu.dutir.utility.encoding.Encoding;
import cn.edu.dutir.utility.encoding.zhcode;

public class Big52GB2312 {
	private static zhcode zhcoder = new zhcode();

	private static String srcFileOrDir = "E:/Corpus/NTCIR-6/Zip Corpus/CIRB040";
	private static String dstFileOrDir = "E:/Corpus/NTCIR-6/GB2312/CIRB040";

	/**
	 * Partial encoding code:
	 *  GB2312		= 0
	 *  GBK			= 1
	 *  HZ			= 3
	 *  BIG5		= 4
	 *  UTF8		= 6
	 *  UNICODES	= 11
	 */	
	private static int srcEncoding = Encoding.BIG5;   // BIG5
	private static int dstEncoding = Encoding.GB2312; // GB2312
	
	/**
	 * @param args
	 */

	public static void main(String[] args) {
		Date start = new Date();

		zhcoder.convertFile(srcFileOrDir, dstFileOrDir, srcEncoding,
				dstEncoding);

		Date end = new Date();
		System.out.println("Time: " + (end.getTime() - start.getTime()) / 1000
				+ " s");
	}
}
